﻿<Window
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
    xmlns:Custom="http://schemas.pavel.fedarovich.com/winfx/2010/xaml/presentation" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" x:Name="SetariWindow" x:Class="SetariWindowClass"
    Title="SetariWindowClass" Height="345" Closing="Window_Closing_1" WindowStyle="ThreeDBorderWindow" Width="400" ResizeMode="NoResize">
    <Window.Resources>
        <XmlDataProvider x:Key="Setari" Source="setari.xml" XPath="setari" />
        <XmlDataProvider x:Key="Autorizati" Source="Autorizati.xml" XPath="autorizati" />
        <DataTemplate x:Key="AutorizatTemplate">
            <!--<Image Width="75" Height="75" Source="{Binding Mode=OneWay, XPath=media:thumbnail/@url}"/>-->
            <!--<TextBlock Text="{Binding Source={StaticResource Autorizati},Path=autorizat/SerieAutorizat}"/>-->
           
        </DataTemplate>
    </Window.Resources>
    <Grid DataContext="{Binding Source={StaticResource Autorizati}}">
        <TabControl Margin="10,10,0,37" Width="372" HorizontalAlignment="Left" DataContext="{Binding Source={StaticResource Autorizati}}">
            <TabItem Header="Setari generale">
                <Grid Background="#FFE5E5E5">
                    <TextBox 
                 		x:Name="FolderTextBox" 
                 		HorizontalAlignment="Left" 
                 		Height="23" Margin="110,10,0,0" 
                 		TextWrapping="Wrap" Text="{Binding Mode=TwoWay, Source={StaticResource ResourceKey=Setari}, UpdateSourceTrigger=LostFocus, XPath=WorkingDir}"
                 		VerticalAlignment="Top" Width="120"/>
                    <Button Content="Select" HorizontalAlignment="Left" Margin="235,10,0,0" VerticalAlignment="Top" Width="75" Click="Button_Click_1"/>
                    <Label Content="Director de lucru" HorizontalAlignment="Left" Margin="6,10,0,0" VerticalAlignment="Top"/>
                </Grid>
            </TabItem>
            <TabItem Header="Autorizati">
                <Grid Background="#FFE5E5E5">
                    <ListBox HorizontalAlignment="Left" Height="173" Margin="10,10,0,0" VerticalAlignment="Top" Width="342" >
                        <RadioButton Content="autorizat 1"/>
                        <RadioButton Content="Autorizat 2"/>
                        <RadioButton Content="Autorizat 3"/>
                    </ListBox>
                </Grid>
            </TabItem>
            <TabItem Header="TabItem" HorizontalAlignment="Left" Height="20" VerticalAlignment="Top" Width="57">
                <Grid Background="#FFE5E5E5">
                    <ListView
                        ItemsSource="{Binding Source={StaticResource Autorizati}, XPath=autorizat}"
                        ItemTemplate="{StaticResource AutorizatTemplate}"
                        HorizontalAlignment="Left" Height="138" Margin="10,10,0,0" VerticalAlignment="Top" Width="342">
                        <ListView.View>
                            <GridView>
                                <GridViewColumn Header="Serie" DisplayMemberBinding="{Binding XPath=SerieAutorizat}"/>
                                <GridViewColumn>
                                    <GridViewColumn.Header>
bla bla bla
                                    </GridViewColumn.Header>
                                </GridViewColumn> 
                                <GridViewColumn Header="Autorizat" DisplayMemberBinding="{Binding XPath=NumeAutorizat}"/>
                            </GridView>
                        </ListView.View>
                    </ListView>

                </Grid>
            </TabItem>
            <TabItem Header="TabItem" HorizontalAlignment="Left" Height="20" VerticalAlignment="Top" Width="57">
                <Grid Background="#FFE5E5E5">
                    <DataGrid HorizontalAlignment="Left" Margin="10,10,0,0" VerticalAlignment="Top" Height="173" Width="342"
                              ItemsSource="{Binding XPath=/autorizati/autorizat}"
                              DataContext="{StaticResource Autorizati}"
                              AutoGenerateColumns="False" SelectionUnit="CellOrRowHeader" AlternationCount="1" AlternatingRowBackground="#FFDADADA" CanUserAddRows="True">
                        <DataGrid.Columns>
                            <DataGridTextColumn Header="Nume Autorizat" Binding="{Binding XPath=NumeAutorizat}" ClipboardContentBinding="{x:Null}"/>
                            <DataGridTextColumn Header="Serie Autorizat" Binding="{Binding XPath=SerieAutorizat}" ClipboardContentBinding="{x:Null}"/>
                        </DataGrid.Columns>

                    </DataGrid>
                    <TextBox x:Name="NewNumeTextBox" HorizontalAlignment="Left" Height="23" Margin="10,188,0,0" TextWrapping="Wrap" Text="Nume Autorizat" VerticalAlignment="Top" Width="120" GotFocus="TextBox_GotFocus_1" LostFocus="TextBox_LostFocus_1"/>
                    <TextBox x:Name="NewSerieTextBox" HorizontalAlignment="Left" Height="23" Margin="135,188,0,0" TextWrapping="Wrap" Text="Serie Autorizat" VerticalAlignment="Top" Width="120" GotFocus="TextBox_GotFocus_2" LostFocus="TextBox_LostFocus_2"/>
                    <Button Content="Adauga" HorizontalAlignment="Left" Margin="277,189,0,0" VerticalAlignment="Top" Width="75" Click="Button_Click_2"/>
                </Grid>
            </TabItem>
        </TabControl>
        <Button x:Name="OKButton" Content="OK" HorizontalAlignment="Left" Margin="229,285,0,0" VerticalAlignment="Top" Width="75"/>
        <Button x:Name="CancelButton" Content="Cancel" HorizontalAlignment="Left" Margin="309,285,0,0" VerticalAlignment="Top" Width="75"/>

    </Grid>



</Window>
